package com.yunqian.web;

import com.yunqian.redot.domain.dto.MenuDto;
import com.yunqian.redot.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author czy
 * @describe
 * @date 2018/11/8
 */
@RestController
@RequestMapping("/api/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/all")
    public List<MenuDto> all(){
        return menuService.getAllMenu();
    }

}
